package cn.xiaopengstack.infrastructure.persistent.dao;

import cn.bugstack.middleware.db.router.annotation.DBRouter;
import cn.bugstack.middleware.db.router.annotation.DBRouterStrategy;
import cn.xiaopengstack.infrastructure.persistent.po.UserRaffleOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author jiangyangang
* @description 针对表【user_raffle_order_000(用户抽奖订单表)】的数据库操作Mapper
* @createDate 2025-07-02 11:45:57
* @Entity cn.xiaopengstack.infrastructure.persistent.po.UserRaffleOrder
*/
@Mapper
@DBRouterStrategy(splitTable = true)
public interface IUserRaffleOrderDao {

    @DBRouter(key = "userId")
    int insert(UserRaffleOrder record);

    @DBRouter
    int insertSelective(UserRaffleOrder record);

    UserRaffleOrder selectByPrimaryKey(Long id);

    @DBRouter(key = "userId")
    int updateByPrimaryKeySelective(UserRaffleOrder record);

    @DBRouter(key = "userId")
    int updateByPrimaryKey(UserRaffleOrder record);

    @DBRouter(key = "userId")
    UserRaffleOrder queryRaffleActivityUnusedPartakeOrderByUid(UserRaffleOrder userRaffleOrder);
}
